<!DOCTYPE html>
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
  <meta name="description" content="刘清政">
  <meta name="keyword" content="hexo-theme">
  
    <link rel="shortcut icon" href="/css/images/logo.png">
  
  <title>
    
      Justin-刘清政的博客
    
  </title>
  <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <link href="//cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
  <link href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/tomorrow.min.css" rel="stylesheet">
  
<link rel="stylesheet" href="/css/style.css">

  
    
<link rel="stylesheet" href="/css/plugins/gitment.css">

  
  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/geopattern/1.2.3/js/geopattern.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>
  
    
<script src="/js/qrious.js"></script>

  
  
    
<script src="/js/gitment.js"></script>

  
  

  
<meta name="generator" content="Hexo 4.2.0"></head>
<div class="wechat-share">
  <img src="/css/images/logo.png" />
</div>

  <body>
    <header class="header fixed-header">
  <div class="header-container">
    <a class="home-link" href="/">
      <div class="logo"></div>
      <span>Justin-刘清政的博客</span>
    </a>
    <ul class="right-list">
      
        <li class="list-item">
          
            <a href="/" class="item-link active">主页</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/tags/" class="item-link">标签</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/archives/" class="item-link">归档</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/about/" class="item-link">关于我</a>
          
        </li>
      
    </ul>
    <div class="menu">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </div>
    <div class="menu-mask">
      <ul class="menu-list">
        
          <li class="menu-item">
            
              <a href="/" class="menu-link mobile-active">主页</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/tags/" class="menu-link">标签</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/archives/" class="menu-link">归档</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/about/" class="menu-link">关于我</a>
            
          </li>
        
      </ul>
    </div>
  </div>
</header>

    <main class="app-body">
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/13-%E8%87%AA%E5%AE%9A%E4%B9%89%E9%85%8D%E7%BD%AE/">python/路飞项目/1-项目基础/13-自定义配置</a>
      </h2>
      <p class="article-date">2020年2月27日</p>
      
      <div class="article-summary">
        
          自定义常量配置文件：settings/const.py12# 自定义的常量配置文件，在settings中 from 该文件 import *，将名字全部丢给settingsBANNER_COUNT = 4



加载自定义配置名称空间：settings/dev.py12# 加载自定义配置名称 ...
        
      </div>
      <a class="more" href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/13-%E8%87%AA%E5%AE%9A%E4%B9%89%E9%85%8D%E7%BD%AE/">详情...</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/12-%E5%89%8D%E5%90%8E%E5%8F%B0%E5%88%86%E7%A6%BB%E8%B7%A8%E5%9F%9F%E4%BA%A4%E4%BA%92/">python/路飞项目/1-项目基础/12-前后台分离跨域交互</a>
      </h2>
      <p class="article-date">2020年2月27日</p>
      
      <div class="article-summary">
        
          分离的前后台交互后台处理跨域安装插件123&gt;: pip install django-cors-headers插件参考地址：https:&#x2F;&#x2F;github.com&#x2F;ottoyiu&#x2F;django-cors-headers&#x2F;

项目配置：de ...
        
      </div>
      <a class="more" href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/12-%E5%89%8D%E5%90%8E%E5%8F%B0%E5%88%86%E7%A6%BB%E8%B7%A8%E5%9F%9F%E4%BA%A4%E4%BA%92/">详情...</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/10-%E5%90%8E%E5%8F%B0%E4%B8%BB%E9%A1%B5%E6%A8%A1%E5%9D%97%E8%AE%BE%E8%AE%A1/">python/路飞项目/1-项目基础/10-后台主页模块设计</a>
      </h2>
      <p class="article-date">2020年2月27日</p>
      
      <div class="article-summary">
        
          home模块创建home模块1234567前提：在 luffy 虚拟环境下1.终端从项目根目录进入apps目录&gt;: cd luffyapi &amp; cd apps2.创建app&gt;: python ..&#x2F;..&#x2F;manage.py startapp home
 ...
        
      </div>
      <a class="more" href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/10-%E5%90%8E%E5%8F%B0%E4%B8%BB%E9%A1%B5%E6%A8%A1%E5%9D%97%E8%AE%BE%E8%AE%A1/">详情...</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/11-xadmin%E5%90%8E%E5%8F%B0%E7%AE%A1%E7%90%86/">python/路飞项目/1-项目基础/11-xadmin后台管理</a>
      </h2>
      <p class="article-date">2020年2月27日</p>
      
      <div class="article-summary">
        
          xadmin后台管理安装：luffy虚拟环境下1&gt;: pip install https:&#x2F;&#x2F;codeload.github.com&#x2F;sshwsfc&#x2F;xadmin&#x2F;zip&#x2F;django2



注册app：dev.py1234 ...
        
      </div>
      <a class="more" href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/11-xadmin%E5%90%8E%E5%8F%B0%E7%AE%A1%E7%90%86/">详情...</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/7-luffy%E5%89%8D%E5%8F%B0/">python/路飞项目/1-项目基础/7-luffy前台</a>
      </h2>
      <p class="article-date">2020年2月26日</p>
      
      <div class="article-summary">
        
          前台vue环境12345678910111.傻瓜式安装node: 官网下载：https:&#x2F;&#x2F;nodejs.org&#x2F;zh-cn&#x2F;2.安装cnpm: &gt;: npm install -g cnpm --registry&#x3D;https:&#x2F ...
        
      </div>
      <a class="more" href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/7-luffy%E5%89%8D%E5%8F%B0/">详情...</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/6-user%E6%A8%A1%E5%9D%97User%E8%A1%A8/">python/路飞项目/1-项目基础/6-user模块User表</a>
      </h2>
      <p class="article-date">2020年2月26日</p>
      
      <div class="article-summary">
        
          user模块User表创建user模块1234567前提：在 luffy 虚拟环境下1.终端从项目根目录进入apps目录&gt;: cd luffyapi &amp; cd apps2.创建app&gt;: python ..&#x2F;..&#x2F;manage.py startapp  ...
        
      </div>
      <a class="more" href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/6-user%E6%A8%A1%E5%9D%97User%E8%A1%A8/">详情...</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/5-luffy%E6%95%B0%E6%8D%AE%E5%BA%93/">python/路飞项目/1-项目基础/5-luffy数据库</a>
      </h2>
      <p class="article-date">2020年2月26日</p>
      
      <div class="article-summary">
        
          数据库配置创建数据库12345678910111213"""1.管理员连接数据库&gt;: mysql -uroot -proot2.创建数据库&gt;: create database luffy default charset=utf8;3.查看用户&gt;: select user,h ...
        
      </div>
      <a class="more" href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/5-luffy%E6%95%B0%E6%8D%AE%E5%BA%93/">详情...</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/4-luffy%E5%90%8E%E5%8F%B0%E9%85%8D%E7%BD%AE/">python/路飞项目/1-项目基础/4-luffy后台配置</a>
      </h2>
      <p class="article-date">2020年2月26日</p>
      
      <div class="article-summary">
        
          环境变量dev.py12345# 环境变量操作：小luffyapiBASE_DIR与apps文件夹都要添加到环境变量import syssys.path.insert(0, BASE_DIR)APPS_DIR = os.path.join(BASE_DIR, 'apps')sys.path. ...
        
      </div>
      <a class="more" href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/4-luffy%E5%90%8E%E5%8F%B0%E9%85%8D%E7%BD%AE/">详情...</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/3-luffy%E5%90%8E%E5%8F%B0/">python/路飞项目/1-项目基础/3-luffy后台</a>
      </h2>
      <p class="article-date">2020年2月26日</p>
      
      <div class="article-summary">
        
          后台：Django项目创建环境1234567891011"""为luffy项目创建一个虚拟环境&gt;: mkvirtualenv luffy""""""按照基础环境依赖&gt;: pip install django==2.0.7&gt;: pip install djangorestfr ...
        
      </div>
      <a class="more" href="/python/%E8%B7%AF%E9%A3%9E%E9%A1%B9%E7%9B%AE/1-%E9%A1%B9%E7%9B%AE%E5%9F%BA%E7%A1%80/3-luffy%E5%90%8E%E5%8F%B0/">详情...</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/linux/%E5%85%B6%E4%BB%96/02-%E6%9F%A5%E7%9C%8BLinux%E5%86%85%E6%A0%B8%E7%89%88%E6%9C%AC%E5%92%8C%E7%B3%BB%E7%BB%9F%E7%89%88%E6%9C%AC/">linux/其他/02-查看Linux内核版本和系统版本</a>
      </h2>
      <p class="article-date">2020年2月18日</p>
      
      <div class="article-summary">
        
          查看Linux内核版本和系统版本一、查看Linux内核版本命令（两种方法）1、cat /proc/version12[root@lqz ~]# cat /proc/versionLinux version 3.10.0-957.21.3.el7.x86_64 (mockbuild@kbuil ...
        
      </div>
      <a class="more" href="/linux/%E5%85%B6%E4%BB%96/02-%E6%9F%A5%E7%9C%8BLinux%E5%86%85%E6%A0%B8%E7%89%88%E6%9C%AC%E5%92%8C%E7%B3%BB%E7%BB%9F%E7%89%88%E6%9C%AC/">详情...</a>
    </article>
  

  
    <div class="guide-pager">
  
    <a href="/page/29/"><span class="page-arrow">← </span>Prev</a>
  
  
    <a href="/page/31/">Next<span class="page-arrow"> →</span></a>
  
</div>
  
</main>


    <div class="scroll-top">
  <span class="arrow-icon"></span>
</div>
    <footer class="app-footer">
<!-- 不蒜子统计 -->
<span id="busuanzi_container_site_pv">
     本站总访问量<span id="busuanzi_value_site_pv"></span>次
</span>
<span class="post-meta-divider">|</span>
<span id="busuanzi_container_site_uv" style='display:none'>
     本站访客数<span id="busuanzi_value_site_uv"></span>人
</span>
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>



  <p class="copyright">
    &copy; 2021 | Proudly powered by <a href="https://www.cnblogs.com/xiaoyuanqujing" target="_blank">小猿取经</a>
    <br>
    Theme by <a href="https://www.cnblogs.com/xiaoyuanqujing" target="_blank" rel="noopener">小猿取经</a>
  </p>
</footer>

<script>
  function async(u, c) {
    var d = document, t = 'script',
      o = d.createElement(t),
      s = d.getElementsByTagName(t)[0];
    o.src = u;
    if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
    s.parentNode.insertBefore(o, s);
  }
</script>
<script>
  async("//cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js", function(){
    FastClick.attach(document.body);
  })
</script>

<script>
  var hasLine = 'true';
  async("//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js", function(){
    $('figure pre').each(function(i, block) {
      var figure = $(this).parents('figure');
      if (hasLine === 'false') {
        figure.find('.gutter').hide();
      }
      var lang = figure.attr('class').split(' ')[1] || 'code';
      var codeHtml = $(this).html();
      var codeTag = document.createElement('code');
      codeTag.className = lang;
      codeTag.innerHTML = codeHtml;
      $(this).attr('class', '').empty().html(codeTag);
      figure.attr('data-lang', lang.toUpperCase());
      hljs.highlightBlock(block);
    });
  })
</script>





<!-- Baidu Tongji -->

<script>
    var _baId = 'c5fd96eee1193585be191f318c3fa725';
    // Originial
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?" + _baId;
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
</script>


<script src="/js/script.js"></script>


<script src="/js/search.js"></script>


<script src="/js/load.js"></script>



  <span class="local-search local-search-google local-search-plugin" style="right: 50px;top: 70px;;position:absolute;z-index:2;">
      <input type="search" placeholder="站内搜索" id="local-search-input" class="local-search-input-cls" style="">
      <div id="local-search-result" class="local-search-result-cls"></div>
  </span>


  </body>
</html>